package com.hp.techcoin14.mails;

import java.util.ArrayList;
import java.util.List;

public class Mail {

	protected String sender;
	protected List<String> recipients = new ArrayList<String>();;
	
	protected String subject;
	protected String body;
	
	
	public String getSender() {
		return sender;
	}
	public void setSender(String sender) {
		this.sender = sender;
	}
	public List<String> getRecipients() {
		return recipients;
	}
	public void setRecipients(List<String> recipients) {
		this.recipients = recipients;
	}
	public void addRecipient(String recipient){
		recipients.add(recipient);
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	
	public  String toString() {
		StringBuffer str = new StringBuffer();
		
		str.append("Sender: "+sender+"\n");
		str.append("Recipients: ");
		for (String recipient: recipients){
			str.append(recipients+" ");
		} str.append("\n");
		str.append("Subject: "+subject+"\n");
		str.append("Body: "+body+"\n");
		
		return str.toString();
	}
	
	
}
